package com.my.study.s3.config;

import com.my.study.s3.bean.S3Bean;
import org.springframework.beans.factory.FactoryBean;

/**
 * @author: yidujun
 * @create: 2021/08/19 14:25
 */
public class S3BeanFactory implements FactoryBean<S3Bean> {

    private S3Bean s3Bean;

    @Override
    public S3Bean getObject() throws Exception {
        return s3Bean;
    }

    @Override
    public Class<?> getObjectType() {
        return s3Bean.getClass();
    }

    @Override
    public boolean isSingleton() {
        return true;
    }

    public S3Bean getS3Bean() {
        return s3Bean;
    }

    public void setS3Bean(S3Bean s3Bean) {
        this.s3Bean = s3Bean;
    }
}
